package com.hqyj.springtest.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.hqyj.springtest.mapper.SchoolMapper;
import com.hqyj.springtest.pojo.School;


@Service
public class SchoolService {
	@Autowired
	SchoolMapper sm;
	
	public List<School> getAllSchool(){
		return  sm.selectByExample(null); // sm����null.
	}
	
	// ���
	public int addSchool(School sc) {
		return sm.insert(sc);
	}
	
	// ����
	public int updateSchool(School sc) {
		return sm.updateByPrimaryKeySelective(sc);
	}
	
}
